cmake_minimum_required(VERSION 3.10)
project(lvgl)
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")

set(CMAKE_C_STANDARD 99)#C99 # lvgl officially support C99 and above

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

add_subdirectory(lv_drivers)
add_subdirectory(lvgl)
target_include_directories(lv_drivers PUBLIC ${PROJECT_SOURCE_DIR})
target_include_directories(lvgl PUBLIC ${PROJECT_SOURCE_DIR})

add_executable(main main.c mouse_cursor_icon.c)

target_link_libraries(main lv_drivers lvgl lvgl::examples lvgl::demos ${SDL2_LIBRARIES} m pthread)
add_custom_target (run COMMAND ${EXECUTABLE_OUTPUT_PATH}/main DEPENDS main)

